import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import Components from 'unplugin-vue-components/vite';
import {VantResolver} from 'unplugin-vue-components/resolvers';

// https://vitejs.dev/config/
export default defineConfig({
    base: './',
    resolve: {
        alias: {
            '@': '/src/',      //格式一定要写对喽不然没有代码提示或者报错
        }
    },
    server:{
        headers:{
            'Access-Control-Allow-Origin': '*'
        },
    },

    plugins: [vue(), Components({
        resolvers: [VantResolver()],
    }),]
})
